﻿@model qltscd.Models.BaseClient.DanhMucLoaiTien
@{
    ViewBag.Title = "SuaLoaiTien";
    Layout = "~/Views/Shared/Modules/_LayoutDanhMucNhapLieu.cshtml";
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script>
    function submitTaoLoaiTien(kieu) {
        document.getElementById("kieu").value = kieu;
        document.forms["TaoLoaiTien"].submit();
    }
</script>

@using (Html.BeginForm("SuaLoaiTien", "LoaiTien", FormMethod.Post, new { @id = "TaoLoaiTien" }))
{
    @Html.ValidationSummary(true)
    @Html.HiddenFor(o=>o.IdentityLoaiTien)
    <input type="hidden" value="0" name="kieu" id="kieu"/>                                           
    <fieldset>
        <legend>Danh mục loại tiền</legend>
        <table border="0" width="98%" cellpadding="10px">
        <tr>
            <td style="margin-left: 10px; width:50%" class="label_col" >
                Mã loại tiền
            </td>
            <td style=" width:50%">
                @Html.TextBoxFor(model => model.MaLoaiTien, new { @style = "width:98%; " })
              
            </td>
            </tr>
            <tr>
            <td style="margin-left: 10px;width:50%" class="label_col">
                Tên loại tiền
            </td> 
            <td>
                @Html.TextBoxFor(model => model.TenLoaiTien, new { @style = "width:98%; " })
             
            </td>
        </tr>
        <tr>
            <td style="margin-left: 10px;width:50%" class="label_col">
                Tên viết tắt
            </td>
            <td>
                @Html.TextBoxFor(model => model.TenVietTat, new { @style = "width:98%; " })
           
            </td>
        </tr>
        </table>
        @*<p>
            <input type="submit" value="Create" />
        </p>*@
    </fieldset>
    <div class="divButton">
            <input type="button" value="Lưu" class="button" onclick="submitTaoLoaiTien(0)" />&nbsp;
            <input type="reset" value="Nhập lại" class="button" />&nbsp;
            @Html.ActionLink("Thoát", "Index", null, new { @class = "button" })
        </div>
}

@*<div>
    @Html.ActionLink("Back to List", "Index")
</div>*@
<style type="text/css">
    .lable_col
    {
        font-weight: bold;
        text-align: right;
        font-style: italic;
        margin-right: 5px;
        color: Black;
    }
    fieldset
    {
        height: 85%;
        line-height: 38px;
    }
    legend
    {
        color:Black;
        font-weight:bold;
    }
    td
    {
        vertical-align: middle !important;
        }
</style>
                <div class="errBlock">
                 @Html.ValidationMessageFor(model => model.MaLoaiTien, "", new { @style = "display:block" })
                        @ViewData[qltscd.Contansts.SessionConstants.ERROR_MESSAGE]
                        <br />
                        @Html.ValidationMessageFor(model => model.TenLoaiTien, "", new { @style = "display:block" })
                        @Html.ValidationMessageFor(model => model.TenVietTat, "", new { @style = "display:block" })
                    </div>